package top.hudk.jdk8.stream;

import java.util.function.Function;

/**
 * 描述：
 *
 * @author hudongkang
 * @date 2021-09-01 14:29
 */
public class LambdaExpression {

    public static void main(String[] args){
        LambdaExpression lambdaExpression = new LambdaExpression();
        lambdaExpression.test3();
    }


    public void test(Function<Integer,Integer> function){
        Integer in = 6;
        System.out.println(in);
        Integer r = function.apply(in);
        System.out.println(r);

    }

    public void test2(){
        test(r-> r+1);
    }
    public void test22(){
        test(integer -> null);
    }

    public void test3(){
        new Thread(()->{
            int i = 0;
            i++;
            System.out.println(i);
        }).start();
    }

}
